Counting Sets: Problems and Proofs

Let SS be the set of all infinite sequences of 0s and 1s. Show that SS is uncountable.
Proof: Use Cantor's diagonal argument.
Assume (for contradiction) that we have an enumeration of the elements of SS; let it be SS = {s1,s2,s3,...s_1, s_2, s_3,...} where each sns_n is an infinite sequence of 0s and 1s. We'll write s1=s1,1,s1,2,s1,3,...s_1 = s_{1,1}, s_{1,2}, s_{1,3},..., s2=s2,1,s2,2,s2,3,...s_2 = s_{2,1}, s_{2,2}, s_{2,3}, ..., and so on. So sn=sn,1,sn,2,sn,3,...s_n = s_{n,1}, s_{n,2}, s_{n,3}, .... We denote the mthm^{th} element of sns_n by sn,ms_{n,m}. Construct a new sequence t=t1,t2,t3,...t = t_1, t_2, t_3,... of 0s and 1s as follows: tn=sn,n1t_n = s_{n,n} - 1. tt is an element of SS, since it is an infinite sequence of 0s and 1s. However, tt cannot be in the enumeration above. Suppose that t=skt = s_k for some value of kk. Then tk=sk,kt_k = s_{k,k}. However, by consutrction, tkneqsk,kt_k neq s_{k,k}. Since this is a contradiction, we can conclude that SS is not countable.

Let SS be the set of all finite subsets of N\mathbb{N}. Show that SS is countable.
Proof: Construct an injective function ff from SNS \to \mathbb{N}. Let p1,p2,p3,...p_1, p_2, p_3,... be a sequence of primes in ascending order. For any finite subset TNT \subseteq \mathbb{N}, start by ordering the elements of TT in ascending order, T=t1,t2,t3,...T = {t_1, t_2, t_3, ...}, which t1<t2<t3<...<tnt_1 < t_2 < t_3 < ... < t_n. Let f(T)=p1t1p2t2...pntnf(T) = p_1^{t_1} \bullet p_2^{t_2} \bullet... \bullet p_n^{t_n}.
To check that ff is injective, suppose that f(T)=f(T)f(T) = f(T\prime). Then p1t1p2t2...pntn=p1t1p2t2...pntnp_1^{t_1} \bullet p_2^{t_2} \bullet ... p_n^{t_n} = p\prime_1^{t_1} \bullet p\prime_2^{t_2} \bullet ... p\prime_n^{t_n}. By the fundamental theorem of arithmetic these two products can only be equal if n=nn = n\prime and each of the corresponding powers is equal.

4.11 The countable union of countable sets is countable
Proof: Consider some countable sets X0,X1,X2,...X_0, X_1, X_2,... where X=iNXiX = \underset{i \in \mathbb{N}}{\bigcup} X_i.
Suppose these are all disjoint sets. Otherwise, we can consider the sets X0=X0,X1=X1X0,X2=X2(X0X1)...X\prime_0 = X_0, X\prime_1 = X_1 \setminus X_0, X\prime_2 = X_2 \setminus (X_0 \cup X_1).... All of these are countable, since we know that a subset of a countable set is countable, and they have the same union XX.

Construct the possibly infinite table by writing the elements of X0,X1,X2,...X_0, X_1, X_2,... in the folling pattern:

a00a_{00} a01a_{01} a02a_{02} ...
a10a_{10} a11a_{11} a12a_{12} ...
a20a_{20} a21a_{21} a22a_{22} ...
...

where aija_{ij} is the jthj^{th} element of set XiX_i. The table contains all the elements of X=iNXiX = \underset{i \in \mathbb{N}}{\bigcup} X_i.

f:XN×Nf: X \to \mathbb{N} \times \mathbb{N} such that aij(i,j)a_{ij} \mapsto (i, j) is an injection.
Since the cartesian product of countable sets is countable, there exists an injection g:N×NNg: \mathbb{N} \times \mathbb{N} \to \mathbb{N}.
So, gf:XNg \circ f: X \to \mathbb{N} is also an injection (since the composition of inecjtions is an injection).
So XX is countable.

4.18 Let SS be the set of all surjective functions from the set of positive integers to the set {0,1}\{0, 1\}. Show that SS is uncountable.
Proof Idea: Let S={f:Z+{0,1}}S = \{f: \mathbb{Z}^+ \to \{0, 1\}\}. Let g=NSg = \mathbb{N} \to S be some function. Let's show that gg is not bijective (in particular, it is not surjective).

Define fg:N{0,1}f_g: \mathbb{N} \to \{0, 1\} as follows:

fg(n)={0 if (g(n))(n)=1,1 if (g(n))(n)=0f_g(n) = \begin{cases} 0 \text{ if } (g(n))(n) = 1, \\ 1 \text{ if } (g(n))(n) = 0 \end{cases}

Note that this makes g(n)Sg(n) \in S, so g(n)g(n) is a function NS\mathbb{N} \to S. So we can evaluate g(n)g(n) at any positive integer and obtain either 00 or 11. So (g(n))(n)(g(n))(n) is either 00 or 11.

Show that fgSf_g \in S but fgg(m)f_g \neq g(m) for every mNm \in \mathbb{N}. So gg is not surjective.